<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        div {
        width: 100px;
        height: 90px;
        float: left;
        padding: 5px;
        margin: 5px;
        background-color: #EEEEEE;
    }
    </style>
    <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
</head>

<body>
    <div id="div1">
        <p>id="div1"</p>
        <p>选中</p>
    </div>
    <div id="div2">
        <p>id="div2"</p>
        <p>jQuery选中</p>
    </div>
    <div id="div3">
        <p>id="div3"</p>
        <p>jQuery未选中</p>
    </div>
    <!-- 通过原生js修改样式 -->
    <script>
            var div = document.getElementById('div1');
        div.style.border = "3px solid blue";
    </script>
    <!-- jquery方式修改样式 -->
    <script>
    var div2 = $('#div2');
    div2.css('border','3px solid red');
    </script>
</body>

</html>